
package com.zsrt.day20170505.ch03;


import org.junit.Test;

public class StackTest {

	@Test
	public void testName() throws Exception {
		
		Node head = new Node();
		Stack stack = new Stack();
		stack.setHead(head);
		
		Node node1 = new Node(10);
		Node node2 = new Node(20);
		Node node3 = new Node(30);
		
		stack.push(node1);
		//stack.printStack();
		stack.push(node2);
		stack.printStack();
		stack.push(node3);
		stack.printStack();
		
		Node node = stack.pop();
		System.out.println(node.getNode());
		
	}
	
}
